package com.class05.static1;

/**
 * @ClassDescription:
 * @JdkVersion: 17
 * @Author: yxy
 * @Created: 2024/4/11 8:33
 */
public class Pig {
    static String name;
    static int size;
    String color;

    public void eat() {
        System.out.println("eat");
    }

    public static void sleep() {
        System.out.println("sleep");
    }

    public static void main(String[] args) {
        Pig.size = 100;
        Pig.sleep();
        Pig.name = "peiqi";
        Pig pig = new Pig();
        pig.color = "红色";
        pig.eat();
    }
}
